package com.bana.fvs.app.mvp.contract;

import android.app.Activity;

import com.bana.fvs.app.main.entity.UserInfoBean;
import com.bana.fvs.app.module.info.entity.LogOutBean;
import com.bana.fvs.app.mvp.model.BaseModel;
import com.bana.fvs.app.mvp.presenter.BasePresenter;
import com.bana.fvs.app.mvp.view.IBaseView;
import com.wei.commonlibrary.net.OkhttpRequest;
import com.wei.commonlibrary.net.ResultCallback;

/**
 * Created by ${wei} on 2017/4/14.
 * 用户信息
 */

public interface UserInfoContract {
    abstract class AbsUserInfoModel extends BaseModel {
        public abstract OkhttpRequest http_logout(String token);

        public abstract void http_updatePhone(String token, String phone, ResultCallback<String> callback);

        public abstract OkhttpRequest http_getUserInfo(String token);
    }

    abstract class AbsuserInfoPresenter extends BasePresenter<AbsUserInfoModel, IUserInfoView> {
        public abstract void http_logout(Activity activity);

        public abstract void http_updatePhone(Activity activity, String phone);

        public abstract void getUserInfo(Activity activity);
    }

    interface IUserInfoView extends IBaseView<LogOutBean> {

        /**
         * 修改手机号成功后回调
         */
        void onUpdatePhoneSuccess(String newPhone);

        void onUserInfoSuccess(UserInfoBean u);
    }
}
